#pragma once

/// <summary>
/// CollisionUtil: Methods to check camera collision status
/// <summary>

/**	Author: Dane Bulat
  * Created: 06/2013
  * Last Modified: 30/06/13
  * Version: v1.0
  */

// Includes
#include "InstanceMap.h"
#include "ModelData.h"
#include "Camera.h"

// Class Definition
class CollisionUtil
{
public:

  /**
    * CollisionUpdateCamera
	*
	* @param d3d Device Context.
	* @param Is the camera dollying in or out.
	* @param Vector of all of the instance maps in the scene.
	* @param Vector of all of the model data in the scene.
	* @param Pointer to camera system.
	* @param Desired distance between player mesh and camera.
	* @param Delta Time since last update.
	*/
	static void CollisionUpdateCamera(ID3D11DeviceContext* dc, bool dollying, vector<InstanceMap*>& instanceMaps,
		vector<ModelData*>& modelData, Camera* pCamera, float desiredDistance, float dt);

  /**
    * UpdateTitleBarStats
	*
	* @param String to display in caption bar.
	* @param Vector of all of the instance maps in the scene.
	*/
	static void UpdateTitleBarStats(std::wstring& caption, vector<InstanceMap*>& instanceMaps);

private:
//==============================
// Constructors / Destructors
//==============================

	/// Private Default Constructor.
	CollisionUtil();

	/// Private Copy Constructor.
	CollisionUtil(const CollisionUtil&);

	/// Private Destructor.
	~CollisionUtil();

//==============================
// Collision Checks
//==============================

  /**
    * CollisionCheckCamera
	*
	* Iterates through instance maps and model data to check camera collision.
	*	
	* @param d3d Device Context.
	* @param Vector of all of the instance maps in the scene.
	* @param Vector of all of the model data in the scene.
	* @param Pointer to camera system.
	* @param Delta Time since last update.
	*/
	static void CollisionCheckCamera(ID3D11DeviceContext* deviceContext, InstanceMap* pInstanceMap, ModelData* pModelData,
		Camera* pCamera, float dt);


  /**
    * CollisionDollyOut
	*
	* Iterates through instance maps and model data to check camera collision when dollying the camera.
	*	
	* @param d3d Device Context.
	* @param Vector of all of the instance maps in the scene.
	* @param Vector of all of the model data in the scene.
	* @param Pointer to camera system.
	*/
	static bool CollisionDollyOut(ID3D11DeviceContext* deviceContext, InstanceMap* pInstanceMap, ModelData* pModelData, Camera* pCamera);
};